#For information

url = '''<li><a href="https://pvp.qq.com/web201605/herodetail/531.shtml" target="_blank"><img width="91" height="91" alt="镜" src="http://game.gtimg.cn/images/yxzj/img201606/heroimg/531/531.jpg">镜</a></li>
<li><a href="https://pvp.qq.com/web201605/herodetail/524.shtml" target="_blank"><img width="91" height="91" alt="蒙犽" src="http://game.gtimg.cn/images/yxzj/img201606/heroimg/524/524.jpg">蒙犽</a></li>
<li><a href="https://pvp.qq.com/web201605/herodetail/525.shtml" target="_blank"><img width="91" height="91" alt="鲁班大师" src="http://game.gtimg.cn/images/yxzj/img201606/heroimg/525/525.jpg">鲁班大师</a></li>'''

def wang_zhe_string(s):
    global count
    count += 1
    link_li = s.find("</li>")
    if link_li == -1:
        return -1
    else:
        print("The {} page".format(count))
        link_information = s.find("href=")
        start_information = s.find('"', link_information)
        end_information = s.find('"', start_information + 1)
        information = s[start_information + 1:end_information]
        print("详细信息：", information)
        link_pic = s.find("src=")
        start_pic = s.find('"', link_pic)
        end_pic = s.find('"', start_pic + 1)
        pic = s[start_pic + 1:end_pic]
        print("图片：", pic)
        link_name = s.find("alt=")
        start_name = s.find('"', link_name)
        end_name = s.find('"', start_name + 1)
        name = s[start_name + 1:end_name]
        print("名字：", name, "\n")
        return link_li

count = 0
while True:
    end = wang_zhe_string(url)
    if end == -1:
        break
    url = url[end + 1:]